<?php

class Core_Model_Foundation_Collection_Catalogue extends Dcmp_Model_Collection_Strong {

    public function __construct() {
        parent::__construct();
        $this->setItemClass('foundation/catalogue');
        $this->from('{t}foundation_catalogue', 'a')->field('a.*');
    }

    public function joinRelation() {
        return $this->innerJoin('{t}foundation_catalogue_relation', 'b', 'b.catalogue_code', 'a.code')
                    ->fields('b.catalogue_code', 'b.parent_code', 'b.code_path');
    }
}